import { RouteRecordRaw } from "vue-router";

export const Layout = () => import("@/layout/index.vue");

export const operateRoutes: RouteRecordRaw[] = [
  {
    path: "/operate-global",
    name: "OperateGlobal",
    component: Layout,
    redirect: "/operate-global/recharge",
    meta: { title: "全局管理", icon: "ele-Menu" },
    children: [
      {
        path: "recharge",
        name: "GlobalRecharge",
        component: () =>
          import("@/views/operateCenter/globalManage/rechargeTemp/index.vue"),
        meta: { title: "默认充值模板", icon: "ele-Coin" },
      },
      {
        path: "returnTemp",
        name: "GlobalReturn",
        component: () =>
          import("@/views/operateCenter/globalManage/returnTemplate/index.vue"),
        meta: { title: "默认回传模板", icon: "ele-HelpFilled" },
      },
      {
        path: "banner-list",
        name: "BannerManage",
        component: () => import("@/views/operateCenter/bannerManage/index.vue"),
        meta: { title: "轮播图管理", icon: "ele-Picture" },
      },
      {
        path: "sign",
        name: "GlobalSign",
        component: () =>
          import("@/views/operateCenter/globalManage/signTemp/index.vue"),
        meta: { title: "签到模板", icon: "ele-Flag" },
      },
      {
        path: "limit",
        name: "GlobalPriceLimit",
        component: () =>
          import("@/views/operateCenter/globalManage/priceLimit/index.vue"),
        meta: { title: "价格限制", icon: "ele-Tools" },
      },
    ],
  },
  {
    path: "/operate",
    name: "OperateApps",
    component: Layout,
    children: [
      {
        path: "apps-list",
        name: "AppsManage",
        component: () => import("@/views/operateCenter/appsManage/index.vue"),
        meta: { title: "小程序管理", icon: "ele-FolderOpened" },
      },
    ],
  },
  {
    path: "/operate",
    name: "Distributor",
    component: Layout,
    meta: { title: "分销商管理", icon: "ele-Avatar" },
    children: [
      {
        path: "distribut-list",
        name: "DistributList",
        component: () => import("@/views/operateCenter/distributor/index.vue"),
        meta: { title: "分销商列表", icon: "ele-Tickets" },
      },
      {
        path: "distribut-episode",
        name: "DistributEpisode",
        component: () =>
          import("@/views/operateCenter/distributEpisode/index.vue"),
        meta: { title: "剧目管理", icon: "ele-VideoCamera" },
      },
    ],
  },
  {
    path: "/operate",
    name: "EpisodeManage",
    component: Layout,
    meta: { title: "剧目管理", icon: "ele-VideoCameraFilled" },
    children: [
      {
        path: "episode-list",
        name: "EpisodeManageList",
        component: () =>
          import("@/views/operateCenter/episodeManage/index.vue"),
        meta: { title: "剧目列表", icon: "ele-VideoCameraFilled" },
      },
      {
        path: "episode-add",
        name: "EpisodeAdd",
        component: () =>
          import("@/views/operateCenter/episodeManage/addEpisode.vue"),
        meta: { title: "添加剧目", icon: "ele-VideoCameraFilled" },
      },
      {
        path: "episode-update",
        name: "EpisodeUpdate",
        component: () =>
          import("@/views/operateCenter/episodeManage/updateEpisode.vue"),
        meta: { title: "更新剧目", icon: "ele-VideoCameraFilled" },
      },
      {
        path: "episode-media",
        name: "EpisodeMedia",
        component: () =>
          import("@/views/operateCenter/episodeManage/mediaFile.vue"),
        meta: {
          title: "同步剧目媒资文件",
          icon: "ele-VideoCameraFilled",
          hidden: true,
          parent: "EpisodeManage",
        },
      },
      {
        path: "episode-review",
        name: "EpisodeReview",
        component: () =>
          import("@/views/operateCenter/episodeManage/operatReview.vue"),
        meta: {
          title: "剧目审核",
          icon: "ele-VideoCameraFilled",
          hidden: true,
          parent: "EpisodeManage",
        },
      },
    ],
  },
  {
    path: "/operate-chart",
    name: "OperateChart",
    component: Layout,
    redirect: "/operate-chart/order",
    meta: { title: "数据报表", icon: "ele-Histogram" },
    children: [
      {
        path: "order",
        name: "ChartOrder",
        component: () =>
          import("@/views/operateCenter/chartManage/order/index.vue"),
        meta: { title: "订单列表", icon: "ele-Document" },
      },
      {
        path: "promotion",
        name: "ChartPromotion",
        component: () =>
          import("@/views/operateCenter/chartManage/promotion/index.vue"),
        meta: { title: "数据推广", icon: "ele-PieChart" },
      },
      {
        path: "report",
        name: "ChartReport",
        component: () =>
          import("@/views/operateCenter/chartManage/report/index.vue"),
        meta: { title: "看剧统计", icon: "ele-Tickets" },
      },
      {
        path: "plotAnalysis",
        name: "PlotAnalysis",
        component: () =>
          import("@/views/operateCenter/chartManage/plotAnalysis/index.vue"),
        meta: { title: "剧情分析", icon: "ele-DocumentRemove" },
      },
    ],
  },
];
